package auto.app.controller.from.menus;

import auto.app.validator.FlagValidator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;


@Data
@ApiModel(value = "菜单新增")
public class MenusAddFrom {
    /**
     * 菜单名称
     */
    @ApiModelProperty("菜单名称")
    @NotEmpty(message = "菜单名称不能为空")
    private String menusName;

    /**
     * 菜单图标
     */
    @ApiModelProperty("菜单图标")
    @NotEmpty(message = "菜单图标不能为空")
    private String menusIcon;

    /**
     * 菜单路由
     */
    @ApiModelProperty("菜单路由")
    @NotEmpty(message = "菜单路由不能为空")
    private String menusRouter;

    /**
     * 父级id
     */
    @ApiModelProperty("父级id")
    private Integer menusParentid;

    /**
     * 节点类型 0非叶子节点 1叶子节点
     */
    @ApiModelProperty("节点类型")
    @FlagValidator(value = {"0","1"}, message = "节点类型不对")
    private Integer menusType;

}
